package com.hsgene.order.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hsgene.common.util.date.SimpleDateUtils;
import com.hsgene.common.util.date.TimeJsonDeserializer;

import java.util.Date;

/**
 * @desc:运营后台订单发票
 * @author: 江承良
 * @date: 2018/8/9 17:35
 */
@Deprecated
public class OrderMallItemInvoice {
    /**
     * 主键
     */
    private String id;

    /**
     * 主订单id
     */
    private String mainOrderId;

    /**
     * 发票类型
     */
    private String invoiceType;

    /**
     * 开票日期
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date invoiceTime;

    /**
     * 发票金额
     */
    private double invoiceMoney;

    /**
     * 发票号码
     */
    private Integer invoiceNum;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date updateTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMainOrderId() {
        return mainOrderId;
    }

    public void setMainOrderId(String mainOrderId) {
        this.mainOrderId = mainOrderId;
    }

    public String getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public Date getInvoiceTime() {
        return invoiceTime;
    }

    /*public void setInvoiceTime(Date invoiceTime) {
        this.invoiceTime = invoiceTime;
    }*/

    public void setInvoiceTime(String invoiceTime) {
        Date date = SimpleDateUtils.parseDate(invoiceTime, SimpleDateUtils.DatePattern.STANDARD_PATTERN.toString());
        this.invoiceTime = date;
    }

    public double getInvoiceMoney() {
        return invoiceMoney;
    }

    public void setInvoiceMoney(double invoiceMoney) {
        this.invoiceMoney = invoiceMoney;
    }

    public Integer getInvoiceNum() {
        return invoiceNum;
    }

    public void setInvoiceNum(Integer invoiceNum) {
        this.invoiceNum = invoiceNum;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
